<template>
    <div class="app-container org">
      <!-- 左侧区域 -->
      <el-card style="width: 100%">
        <el-tabs v-model="activityName" class="demo-tabs">
          <el-tab-pane label="报价信息" name="first">
              <information v-show="activityName == 'first'" ref="informationRef" />
          </el-tab-pane>
          <el-tab-pane label="报价计算" name="second" :disabled="!priceId">
              <calculation v-if="activityName == 'second'" :priceId="priceId"/>
          </el-tab-pane>
          <!-- <el-tab-pane label="报价单" name="third">
              <quotation v-if="activityName == 'third'"/>
          </el-tab-pane> -->
        </el-tabs>
      </el-card>
    </div>
  </template>
  
  <script setup name="PriceQuotation">
  import information from "./cnps/information.vue";
  import calculation from "./cnps/calculation.vue";
  import quotation from "./cnps/quotation.vue";

  const informationRef = ref("")
  const priceId = ref("")

  const activityName = ref('first')

  watch(
  () => informationRef.value?.form,
  (val) => {
    if (val && val.priceId) {
      priceId.value = val.priceId
    }
  }
);
  </script>
  
  <style>
  
  </style>